<div class="fe-floatright-bottom" style="bottom:6rem">
	<div class="icon" style="border-radius: 100%;background-color: #FCC600;width:" href="javascript:;" ng-click="pagedata.showredpage=true">
		<i class="icon icon-ai-hongbao" style="color:red;font-size:1.1rem;"></i>
	</div>
</div>
<div ng-if="pagedata.showredpage" class="popup">
	<style>
	  .rp-container {
    padding-left:10px;
    padding-right:10px;
  }
  .rp-background-lightgray {
    background-color:rgb(240, 240, 240);
  }
  .rp-record {
    padding-top: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgb(240, 240, 240) ;
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .rp-record .avatar {
    width: 50px;
    border-radius: 3px;
  }
  .rp-record .info {
    display: inline-block;
    width: 100%;
  }
  .rp-record .desc {
    display:inline-block;
    margin-left: 1em;
  }
  .rp-record .datetime {
    color: rgb(200, 200, 200);
  }
  .rp-record .amount {
    float: right;
  }
 #unpaid .unpaid-alert .unpaid-subtitle{
    color: #999;
    text-align: center;
    width: 13rem;
    margin: .6rem auto
}
.line-notice-animation {
	display: flex;
	overflow: hidden;
	margin-left:0;
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	-ms-flex: 1;
	flex: 1;
	white-space: nowrap;
}
.line-animation {
    animation: 60s wordsLoop linear infinite normal;
}
@keyframes wordsLoop {
            0% {
                transform: translateX(200px);
                -webkit-transform: translateX(200px);
            }
            100% {
                transform: translateX(-100%);
                -webkit-transform: translateX(-100%);
            }
}
@-webkit-keyframes wordsLoop {
            0% {
                transform: translateX(200px);
                -webkit-transform: translateX(200px);
            }
            100% {
                transform: translateX(-100%);
                -webkit-transform: translateX(-100%);
            }
}
.fui-tab-scroll .item.on, .fui-tab-scroll .item.on a {
    color: #fff;
}
.fui-tab-scroll .item.on:before {height: 0;}
	</style>
	<div class="popup-body">
		<div class="popup-center" style="padding-bottom:0.5rem;width:80%">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showredpage=false"></i>
			<div style="color:#ffcc00;box-shadow:0 1px 2px gray;padding: 3px;text-align:center;margin-bottom:0.3rem;height:260px;background-color:#e52600;border-bottom-right-radius:50% 70px;border-bottom-left-radius:50% 70px;">
			  <div class="lottery-title">
				<div class="line-notice-animation" style="color: #ffffff;line-height:2rem;background: #000000;opacity: 0.7;">
					<div class="line-animation">{{pagedata.red.tips || '暂无中奖记录...'}}</div>
				</div>
			</div>
			<div class="fui-tab-scroll" style="height:2.6rem">
				<div ng-repeat="value in pagedata.red.timelist" ng-class="{'item':1,'on':pagedata.red.nowsendlog.hour==value.hour}" style="color:#f2f2f2;line-height: 1.4;height:2.6rem">
						<div>{{value.hour}}</div>
						<div ng-if="value.status==1" class="text">               
							进行中
						</div>
						<div ng-if="value.status==0" class="text">               
							即将开始
						</div> 
						<div ng-if="value.status==2" class="text">               
							已结束
						</div>
				</div>
			</div>
			  <div style="text-align: center;padding-top:0.5rem;">
				<div style="">
				  <img ng-src="{{tomedia(pagedata.red.member.avatar) ||'../addons/jy_newpaimerch/resource/images/avatar.png'}}" style="display:inline-block;border-radius:5;width:25px;height:24px;margin:0;padding:0">
				  <span style="padding-left:5px;vertical-align:middle;font-weight:bold;line-height:24px;font-size:20px;">今日第{{pagedata.red.issendnum}}期红包</span>
				</div>
				<div style="margin: 10px;"><small>{{pagedata.pcd.city}}【{{pagedata.red.title || '消费金红包'}}】</small></div>
				<div style="margin-top:0.5rem;">
				  <span style="font-size: 0.7rem;vertical-align: top;font-weight: bold;">总额¥</span>
				  <span style="line-height:1em;font-size:1.5rem;">{{pagedata.red.sendred.allfee ||'0.00'}}</span>
				  </div>
				<div class="bold" ng-if="pagedata.red.sendred.id && pagedata.red.sendred.status!=1" ng-click="pagedata.getred()"><small>抢红包 >></small></div>
				<div class="bold" ng-if="!pagedata.red.sendred.id || pagedata.red.sendred.status==1" ng-click="pagedata.getred()"><small>暂时无红包可抢</small></div>
			  </div>
			</div>
			<div style="border-bottom:1px solid #f0f0f0;">
				<div class="rp-container c" style="margin-top:10px;">
					<div style="padding-top:0.5em;padding-bottom:0.5em;">
					已被领取￥{{pagedata.red.getallfee ||'0.00'}}，消费金池剩余￥{{pagedata.red.lastfee ||'0.00'}}
					</div>
				</div>
			</div>
		  <div class="rp-container"  style="background-color:white;height:9rem;overflow-y:scroll"> 
			<div ng-repeat="x in pagedata.red.list" class="rp-record">
			  <img ng-src="{{tomedia(x.member.avatar) ||'../core/resource/images/nopic.jpg'}}" class="avatar">
			  <div class="info" style="vertical-align: center">
				<span class="desc">
				  <div class="nickname">{{x.member.nickname}}</div>
				  <div class="red" style="font-size:0.5rem">{{x.typetitle||'消费金'}}</div>
				  <div class="datetime" style="font-size:0.5rem">{{x.createtime}}</div>
				</span>
				<span class="amount" ng-if="x.type==1">{{x.fee}}个</span>
				<span class="amount" ng-if="x.type==2">{{x.fee}}元</span>
				<span class="amount" ng-if="x.type>=3">一张</span>
			  </div>
			</div>
			<div class="content-empty" style="margin-top:1rem" ng-show="!pagedata.red.list || pagedata.red.list.length == 0">
			  <i class="icon icon-ai-hongbao" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有的红包记录！</p>
			</div>
		  </div>
		</div>
	</div>
</div>
<div ng-if="!pagedata.showredpage && !pagedata.closedred_tan && pagedata.red.sendred.id && pagedata.red.sendred.status!=1" class="popup" id="sale_luck">
	<div class="popup-body">
    <div class="popup-center" style="width:80%;height:17rem;background:url({{tomedia(pagedata.pluginset.red_tan) || '../addons/jy_newpaimerch/resource/images/red_tan.png'}}) no-repeat;background-size:100% 100%;text-align:center;">
		<i class="closed icon icon-cuowu"  style="top:105%" ng-click="pagedata.closedred_tan=true"></i>
		<div class='bold' href="javascript:;" ng-click="pagedata.closedred_tan=true;pagedata.showredpage=true;pagedata.getred()" style="padding-top:16rem;color:#fcea10">去抢红包</div>
	</div>
	</div>
</div>
<audio id="openvoice" controls preload="auto" style="display:none;">
	<source ng-src="{{tomedia(pagedata.red.red_mp3) || '../addons/jy_merch/resource/red.wav'}}"></source>
</audio>
<script>
scope.pagedata.gored=function(){
	scope.get('jy_newpaimerch/index/gored/',function(res){
		console.log(res);
		scope.pagedata.red=res
		scope.$evalAsync();
	});
}
scope.pagedata.gored();
scope.pagedata.getred=function(){
	scope.post_json('jy_newpaimerch/index/getred/sendredlogid='+scope.pagedata.red.sendred.id,{},function(res){
		scope.pagedata.gored();
		scope.message(res);
		$("#openvoice")[0].play();
	});
}
</script>